package xine.demo.ssm.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import xine.demo.ssm.dao.BaseDao;

import java.util.List;
import java.util.Map;

@Repository
public class BaseDaoJdbcImpl implements BaseDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public List<Map<String, Object>> getList(String sql) {
        List<Map<String, Object>> list = jdbcTemplate.query(sql,new MapMapper());
        return list;
    }
}
